<template>
	<view class="company-item set-bottom situation1">
		<view class="taskdetail-top">
			<view class="taskdetail-box1 flex">
				<view>
					<h2 class="task-title">{{items.name}}</h2>
					<view class="task-todo">{{items.simple_name}}</view>
				</view>
				<view class="task-state">
					{{items.company_type_name}}
				</view>
				<view>
					<view class="flex">
						<view class="status-title">启用状态:</view>
						<view class="status-status">{{items.status_name}}</view>
					</view>
				</view>
			</view>
			<view class="taskdetail-box2 flex">
				<view class="task-numbox">
					<view class="task-num1">{{items.company_level_name}}</view>
					<view class="tast-titlenum">客户级别</view>
				</view>
				<view class="task-numbox">
					<view class="task-num2">{{items.services_user_name}}</view>
					<view class="tast-titlenum">服务负责人</view>
				</view>
				<view class="task-numbox">
					<view class="task-num1">{{items.station_name_str}}</view>
					<view class="tast-titlenum">驻场负责人</view>
				</view>
			</view>
			<view class="taskdetail-box3 flex">
				<view class="detail-title">联系人:</view>
				<view class="detail-detail">{{items.contacts}} - {{items.contact_tel}}</view>
			</view>
			<view class="taskdetail-box3 flex">
				<view class="detail-title">渠道来源:</view>
				<view class="detail-detail">{{items.company_channel_name}}</view>
			</view>
			<view class="taskdetail-box3 flex">
				<view class="detail-title">创建人:</view>
				<view class="detail-detail">{{items.user_name}}</view>
			</view>
			<view class="taskdetail-box3 flex">
				<view class="detail-title">创建时间:</view>
				<view class="detail-detail">{{items.create_date}}</view>
			</view>
		</view>
		<view class="btm-items flex">
			<view class="item" @tap="handleClickChange(items)">
				<image class="item-img" src="../../static/icon/icon_calendar.png" mode="widthFix" />
				<text class="btn-title">编辑</text>
			</view>
			<view class="item">
				<image class="item-img" src="../../static/icon/icon_present.png" mode="widthFix" />
				<text class="btn-title">跟进</text>
			</view>
			<view class="item item-last" @tap="handleClickDisable(items)" v-if="items.status != 0">
				<image class="item-img" src="../../static/icon/icon_user_close.png" mode="widthFix" />
				<text class="btn-title">禁用</text>
			</view>
			<view class="item item-last" @tap="handleClickStart(items)" v-if="items.status == 0">
				<image class="item-img" src="../../static/icon/icon_user_close.png" mode="widthFix" />
				<text class="btn-title">启用</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			items: Object,
			index: Number
		},
		data() {
			return {
				Images: this.Images,
			}
		},
		methods: {
			onPressToNavigateDetail() {
				uni.navigateTo({
					url: '/pages/talent_pool/talent_detail',
				});
			}
		}
	}
</script>

<style scoped lang="stylus">
	.set-bottom {
		margin-bottom: 20upx;
	}

	.situation1 {
		.taskdetail-top {
			background: #fff;
			padding: 40upx;

			.taskdetail-box1 {
				height: 164upx;
				align-items: center;
				justify-content: space-between;

				.task-title {
					font-size: 40upx;
					font-weight: 500;
					color: #333;
				}

				.task-todo {
					font-size: 28upx;
					color: #666;
					margin-top: 20upx;
				}

				.task-state {
					height: 46upx;
					width: 144upx;
					border: 2upx solid #5BBD00;
					font-size: 28upx;
					color: #5BBD00;
					font-weight: 500;
					line-height: 46upx;
					text-align: center;
				}

				//第二种情况
				.task-state1 {
					height: 46upx;
					width: 144upx;
					border: 2upx solid #999;
					font-size: 28upx;
					color: #999;
					font-weight: 500;
					line-height: 46upx;
					text-align: center;
				}
			}

			.taskdetail-box2 {
				height: 176upx;
				margin-bottom: 40upx;
				justify-content: space-around;
				align-items: center;
				background: linear-gradient(270deg, rgba(250, 250, 250, 1) 0%, rgba(243, 243, 243, 1) 100%);

				.task-numbox {
					text-align: center;

					.task-num1 {
						font-size: 36upx;
						font-weight: 500;
						color: #333;
					}

					.task-num2 {
						font-size: 36upx;
						color: #4A90E2;
						font-weight: 500;
					}

					.tast-titlenum {
						font-size: 28upx;
						color: #666;
						margin-top: 16upx;
					}
				}

			}

			.taskdetail-box3 {
				// justify-content:space-between;
				margin-bottom: 20upx;

				.detail-title {
					font-size: 28upx;
					color: #999;
				}

				.detail-detail {
					margin-left: 20upx;
					font-size: 28upx;
					color: #333;
				}
			}

		}

		.btm-items {
			height: 90upx;
			border-top: 2upx solid #DBDBDB;
			background: #fff;
			justify-content space-around;
			align-items: center;

			.item {
				border-right: 2upx solid #dbdbdb;
				width: 250upx;
				text-align: center;
				font-size: 28upx;
				font-weight: 400;
				color: rgba(51, 51, 51, 1);

				.item-img {
					height: 26upx;
					width: 26upx;
					margin-right: 10upx;
				}
			}

			.item-last {
				border: 0;
			}
		}
	}
</style>
